<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<base th:href="@{/}"/>
		<meta charset="utf-8">
		<title>帖子主页</title>
		<link rel="stylesheet" href="../css/bootstrap.min.css"/>
		<script src="../js/jquery.min.js"></script>
		<script type="text/javascript" th:inline="javascript">
		function deletePost(tid){
			$.ajax({
				url:[[@{/goods/delete}]],
				"post",
				data:{
					tid
				},
				success:function(obj){
					if(obj == "no"){
						alert("该帖子不允许删除!");
					}else{
						if(window.confirm("真的删除该帖子吗?")){
							var pathName = window.document.location.pathname;
							var projectName = pathName.substring(0,pathName.substr(1).indexOf('/')+1);
							window.location.href = projectName + obj;
						}
					}
				},
				error:function(){
					alert("处理异常!");
				}
			})
		}
		</script>
	</head>
	<body>
	</body>
</html>
